import { Router } from 'express'
import { generateData10 } from '../utils/mockData.js'

const router = Router()

/**
 * @swagger
 * /other-info:
 *   post:
 *     tags:
 *       - 其他信息
 *     summary: '获取其他信息'
 *     description: '根据用户ID、编号和页码获取其他详细信息'
 *     requestBody:
 *       required: true
 *       content:
 *         application/json:
 *           schema:
 *             type: object
 *             properties:
 *               id:
 *                 type: string
 *                 description: '用户ID'
 *               number:
 *                 type: number
 *                 description: '编号'
 *               page:
 *                 type: number
 *                 description: '当前页码'
 *             required:
 *               - id
 *               - number
 *               - page
 *     responses:
 *       '200':
 *         description: '成功获取其他信息'
 *       '400':
 *         description: '参数错误，缺少必要参数'
 */
// 其他信息 /other-info
router.post('/', (req, res) => {
    const {id, number, page} = req.body
    res.json(generateData10({id, number, page}))
})

export default router